package cn.com.nes.mybatis.agent.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author nes
 * @since 2023-04-14
 */
@TableName("protocol_data_item_auth")
public class ProtocolDataItemAuth extends Model<ProtocolDataItemAuth> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 厂商id
     */
    @TableField("manufacture_id")
    private String manufactureId;
    /**
     * 协议id
     */
    @TableField("protocol_id")
    private String protocolId;
    /**
     * 控制指令码
     */
    private String code;
    @TableField("field_name")
    private String fieldName;

    @TableField("user_type")
    private String userType;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getManufactureId() {
        return manufactureId;
    }

    public void setManufactureId(String manufactureId) {
        this.manufactureId = manufactureId;
    }

    public String getProtocolId() {
        return protocolId;
    }

    public void setProtocolId(String protocolId) {
        this.protocolId = protocolId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public static final String ID = "id";

    public static final String MANUFACTURE_ID = "manufacture_id";

    public static final String PROTOCOL_ID = "protocol_id";

    public static final String CODE = "code";

    public static final String FIELD_NAME = "field_name";

    public static final String USER_TYPE = "user_type";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ProtocolDataItemAuth{" +
                ", id=" + id +
                ", manufactureId=" + manufactureId +
                ", protocolId=" + protocolId +
                ", code=" + code +
                ", fieldName=" + fieldName +
                ", userType=" + userType +
                "}";
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }
}
